package com.jade.zsy.crm.entity;

import com.jade.bss.db.IdEntity;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;
import java.math.BigDecimal;

/**
 * 会员的等级
 * User: JinYa 2009_jinya@163.com
 * Date: 2016-4-25
 * Time: 15:04
 * Version : 1.0
 * Remark:
 * History:
 */
@Entity
@Table(name = "STORE_CRM_INTEGRAL")
public class CrmIntegral extends IdEntity {
    /** 实付金额 */
    public static final int MONEY_TYPE_CASH = 0;
    /** 订单金额 高 */
    public static final int MONEY_TYPE_ORDER = 1;

    /** 排序优先级 高 */
    public static final int TYPE_NO_LIMIT = 0;
    public static final int TYPE_GREAT = 1;
    public static final int TYPE_LESS = 2;
    public static final int TYPE_EQULE = 3;
    public static final int TYPE_GREAT_EQULE = 4;
    public static final int TYPE_LESS_EQULE = 5;
    public static final int TYPE_LESS_MIDDLE = 6;
    public static final int TYPE_LESS_RATE = 8;//比例分配

    public static final int STATUS_NORMAL = 0;//正常状态
    public static final int STATUS_STOP = 1;//停用状态
    public static final int STATUS_DISABLED = 9;//失效状态
    /**
     * 规则名称
     */
    @Column (name = "name", nullable = false, length = 100)
    private String name;
    /**
     * 金额类型
     */
    @Column (name = "money_type")
    private int moneyType=MONEY_TYPE_CASH;
    /**
     * 消费金额 积分类型
     */
    @Column (name = "type")
    private int type=TYPE_NO_LIMIT;
    /**
     * 积分类型描述
     */
    @Column (name = "typeDesc")
    private String typeDesc;
    /**
     * 消费金额
     */
    @Column (name = "consume_money_from")
    private BigDecimal consumeMoneyFrom=new BigDecimal("0");
    @Column (name = "consume_money_to")
    private BigDecimal consumeMoneyTo=new BigDecimal("0");
    /**
     * 赠送积分
     */
    @Column (name = "rule")
    private int rule=0;
    /**
     * 状态
     */
    @Column (name = "status")
    private int status=STATUS_NORMAL;
    /**
     * 描述
     */
    @Column(name = "remark", length = 64)
    private String remark;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getMoneyType() {
        return moneyType;
    }

    public void setMoneyType(int moneyType) {
        this.moneyType = moneyType;
    }

    public BigDecimal getConsumeMoneyFrom() {
        return consumeMoneyFrom;
    }

    public void setConsumeMoneyFrom(BigDecimal consumeMoneyFrom) {
        this.consumeMoneyFrom = consumeMoneyFrom;
    }

    public BigDecimal getConsumeMoneyTo() {
        return consumeMoneyTo;
    }

    public void setConsumeMoneyTo(BigDecimal consumeMoneyTo) {
        this.consumeMoneyTo = consumeMoneyTo;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public int getRule() {
        return rule;
    }

    public void setRule(int rule) {
        this.rule = rule;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }
}
